package com.kathony.jangpa.b.tasks.impl;

import com.kathony.jangpa.b.config.LDConfig;
import com.kathony.jangpa.b.tasks.LDStatistic;
import com.kathony.jangpa.b.tasks.LDStatus;
import com.kathony.jangpa.b.tasks.LDTask;
import com.kathony.jangpa.b.tasks.exception.LDConfigException;


public abstract class LDBaseTask implements LDTask{
	protected LDConfig config = new LDConfig();
	protected LDStatus lastStatus = LDStatus.NOSTATUS;
	
	@Override
	public void SetConfig(LDConfig config) throws LDConfigException {
		// TODO Auto-generated method stub
		this.config=config;
	}

	@Override
	public abstract void execute();
		// TODO Auto-generated method stub

	@Override
	public void triggerNotify(){
		//This is the implementation of basic notify
	}
	
	@Override
	public abstract boolean shouldBeNotified();
	

	@Override
	public LDStatus getLastCheckStatus() {
		// TODO Auto-generated method stub
		return this.lastStatus;
	}

	@Override
	public LDStatistic getStatistic() {
		// TODO Auto-generated method stub
		return null;
	}

}
